In recent years, a semiconductor device with a high-speed serial interface is increasing. In the semiconductor device with an interface based on the serial ATA (Advanced Technology Attachment) standard, as one of the high-speed serial interfaces, as a large amount of communication data is required for transmission of video data of high quality and high definition, the further increasing of the transmission speed is required. Therefore, as shown in Non-Patent Literature 1, in the serial ATA standard, the increasing of the transmission speed has been carried forward as 1.5 Gbps in generation 1 (a first generation or Gen1), 3.0 Gbps in generation 2 (a second generation or Gen2), and 6.0 Gbps in generation (a third generation or Gen3).
In this way, in the serial ATA standard, a standard of high transmission speed has been added through revision of the standard. Therefore, there are a plurality of connection speed modes, and one of the connection speed modes must be determined between a host unit and a device unit connected with the host unit. That is, it is necessary to determine the connection speed mode for data transmission and reception before the start of communication. For example, when the host unit such as a personal computer and the device unit such as a hard disk drive (HDD) are connected by a serial ATA interface, it is not possible to communicate if not determining the transmission speed. The transmission speed for the data transmission and reception between both of the units is determined at the time of start of communication by a procedure called a speed negotiation.
Also, it is expected that the increasing of the transmission speed moves ahead in the new generation in the future. As the generation difference between the host unit and the device unit becomes large, the number of times of the speed negotiation increases.
A serial data receiving circuit which determines the transmission speed in such a manner is disclosed in Patent Literature 1 (JP 2008-236178A). This serial data receiving circuit determines the transmission speed of a signal by determining whether or not the number of signal change points between two pulses generated by a period pulse generating section is within a predetermined number.
FIG. 1 is a state transition diagram showing an initialization operation at the time of start of communication in the serial ATA interface of the host unit. However, only the state HP1 and the states HP7-HP11 are shown in the Non-Patent Literature 1 which is related to the present invention. Although not shown, an GOB sequence is first executed at the time of the start of communication, and when the host unit receives COMWAKE from the device unit, the state transfers to the state HP7. In the state HP7, the host unit waits for the end of COMWAKE transmitted from the device unit. When the device unit stops the transmission of COMWAKE, the state transfers to the state HP8 so as to start the speed negotiation.
In the state HP8, the host unit receives an ALIGN primitive transmitted from the device unit in the maximum speed while transmitting D10.2 code to the device unit in the minimum speed (1.5 Gbps), and determines the transmission speed of data which is transmitted from the device unit. When the speeds coincide with each other so that the ALIGN primitive can be detected, the host unit transfers to the state HP9 to set the transmission speed and then transfers to the state HP10. The host unit replies the ALIGN primitive to the device unit in the same transmission speed as the device unit uses, and completes the speed negotiation. Moreover, when a primitive except for ALIGN is transmitted from the device unit and the host unit receives it, the host unit transfers to the state HP11 and completes the connection establishment.
On the other hand, when the host unit cannot detect the ALIGN primitive during the longest period of 873.8·s in the state HP8 because of the reception speed of the host unit is faster than the transmission speed of the device unit, the host unit lowers the reception speed for 1-generation and returns to the state HP1 to carry out the initialization operation from the beginning.
The host unit performs the OOB sequence, and repeats until the ALIGN primitive can be detected.
In this way, the host unit repeats connection trial until the connection can be established, while it changes the operation speed mode from the latest generation to the oldest generation and waits for the time-out. Therefore, even if the host unit is newer than the generation of the connected device, it is not possible to detect the connection speed mode immediately. Therefore, sometimes it takes a long time until the connection establishment.